<template>
  <view class="organization">
    <!-- #ifdef APP-PLUS || MP-->
    <app-plus-bar />
    <!-- #endif -->
    <uni-nav-bar :fixed="true"
                 title="去哪学"
                 :shadow='false'
                 color="#fff"
                 background-color="#0AAFFF"
                 right-icon="search"
                 @click-right="_handleRight">
    </uni-nav-bar>
    <tab-list :tabList='tabList' :_handleTab="_handleTab"/>
    <view class="hotBox">
      <content-list :contentList='contentList'/>
    </view>
  </view>

</template>

<script>
  import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'
  import uniIcon from '@/components/uni-icon/uni-icon.vue'
  import contentList from '@/components/contentList.vue'
  import tabList from '@/components/tabList.vue'
  import appPlusBar from '@/components/appPlusBar.vue'

  export default {
    components: {
      uniNavBar,
      uniIcon,
      contentList,
      tabList,
      appPlusBar
    },
    data() {
      return {
        tabList: [
          {
            name: '周边',
            id: 0
          }, {
            name: '类别',
            id: 1
          }, {
            name: '排序',
            id: 2
          },
        ],
        contentList:[
          {
            type: 1,
            title: "幸福1",
            address: '浦东新区',
            content: {
              currMoney: '99',
              oldMoney: '199',
              discount: '5.0折',
              studyTime: '2'
            },
            img: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/shuijiao.jpg?imageView2/3/w/200/h/100/q/90"
          },
          {
            type: 2,
            title: "木屋1",
            address: '浦东新区',
            content: {
              studyTime: '50',
              contentText: '适合9-10周岁'
            },
            img: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/muwu.jpg?imageView2/3/w/200/h/100/q/90"
          },
          {
            type: 3,
            title: "CBD1",
            address: '浦东新区',
            content: {
              studyTime: '50',
              contentText: '适合9-10周岁啊啊啊啊啊啊啊'
            },
            img: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/cbd.jpg?imageView2/3/w/200/h/100/q/90"
          },
						{
            type: 1,
            title: "幸福1",
            address: '浦东新区',
            content: {
              currMoney: '99',
              oldMoney: '199',
              discount: '5.0折',
              studyTime: '2'
            },
            img: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/shuijiao.jpg?imageView2/3/w/200/h/100/q/90"
          },
          {
            type: 2,
            title: "木屋1",
            address: '浦东新区',
            content: {
              studyTime: '50',
              contentText: '适合9-10周岁'
            },
            img: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/muwu.jpg?imageView2/3/w/200/h/100/q/90"
          },
          {
            type: 3,
            title: "CBD1",
            address: '浦东新区',
            content: {
              studyTime: '50',
              contentText: '适合9-10周岁啊啊啊啊啊啊啊'
            },
            img: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/cbd.jpg?imageView2/3/w/200/h/100/q/90"
          },
						{
            type: 1,
            title: "幸福1",
            address: '浦东新区',
            content: {
              currMoney: '99',
              oldMoney: '199',
              discount: '5.0折',
              studyTime: '2'
            },
            img: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/shuijiao.jpg?imageView2/3/w/200/h/100/q/90"
          },
          {
            type: 2,
            title: "木屋1",
            address: '浦东新区',
            content: {
              studyTime: '50',
              contentText: '适合9-10周岁'
            },
            img: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/muwu.jpg?imageView2/3/w/200/h/100/q/90"
          },
          {
            type: 3,
            title: "CBD1",
            address: '浦东新区',
            content: {
              studyTime: '50',
              contentText: '适合9-10周岁啊啊啊啊啊啊啊'
            },
            img: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/cbd.jpg?imageView2/3/w/200/h/100/q/90"
          }
        ]
      }
    },
    onLoad() {
    },
    methods: {
      _handleTab(index) {
        console.log(index)
      },
      _handleLeft() {
        uni.showToast({
          title: 'left'
        });
      },
      _handleRight() {
        uni.showToast({
          title: 'right'
        });
      },
    }
  }
</script>
<style scoped lang=scss>
  .organization {
    .hotBox {
      padding-top: 88upx;
    }
  }
</style>
